home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 11 / AMUG BBS in a Box Volume XI (April 1994) (MacWizards).iso / Files / Util / Network / SwitchBack 2.2.sit / SwitchBack 2.2 / SwitchBack Help.rsrc / TEXT_133_AppleScript.txt < prev    next >
Encoding:
Text File  |  1993-12-02  |  1.2 KB  |  20 lines

  1. AppleScript
  2.  
  3. SwitchBack supports the required AppleEvent suite, and is fully AppleScript-aware.  You can use AppleScript to execute a series of backups automatically.  Programs that permit scheduled execution of scripts could permit you to do a daily backup, and then shut the machine off.  This ability is very powerful.
  4.  
  5. The following script launches SwitchBack (if it is not already running), brings it to the front and opens four backup documents in sequence.  These documents should be set to start automatically.  Once completed, SwitchBack is told to quit.  The final command sends a ‚ÄúShut Down‚Äù event to the Finder to turn the machine off.
  6.  
  7.     tell application "SwitchBack 2.2"
  8.         activate
  9.     
  10.         open alias "Flying Disc:Backups:Data"
  11.         open alias "Flying Disc:Backups:Development 1"
  12.         open alias "Flying Disc:Backups:Development 2"
  13.         open alias "Flying Disc:Backups:Libraries"
  14.     
  15.         quit
  16.     end tell
  17.  
  18.     tell application "Finder" to ¬´event FNDRshut¬ª
  19.  
  20. If the SwitchBack documents required volumes to be mounted and unmounted you should set SwitchBack‚Äôs preference After Auto-Start to Do Nothing.  In this way SwitchBack will remain the frontmost application for each document opened.